package edu.jkd.controller;


import edu.jkd.entity.Company;
import edu.jkd.service.ICompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhaojianyun
 * @since 2022-11-30
 */
@Controller
public class CompanyController {
    @Autowired
    private ICompanyService companyService;

    @GetMapping("zhaoping3/{cId}")
    public ModelAndView getCompany(@PathVariable("cId") Integer cId) {
        ModelAndView mav = new ModelAndView("zhaoping3");
        Company company=companyService.getById(cId);
        mav.addObject("company", company);
        return mav;
    }
}
